package org.jxf.zhaohuo.utils;

import android.util.Log;

public class Stopwatch {
	private String watchName;
	private long startTime;
	private long spendTime;
	private Stopwatch(){
	}
	
	public Stopwatch(String watchName){
		this.watchName = watchName;
	}
	
	public void start(){
		this.startTime = System.currentTimeMillis();
	}
	
	public void stop(){
		this.spendTime = System.currentTimeMillis()-startTime;
		Log.d(watchName, watchName + " time = " + spendTime);
	}
}
